package com.yami.shop.api.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.model.MsgType;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.service.MsgTypeService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;

/**
 * (MsgType)表控制层
 *
 * @author rows
 * @since 2023-04-11 08:00:39
 */
@RestController
@RequestMapping("/p/msgType")
@RequiredArgsConstructor
public class MsgTypeController {
    /**
     * 服务对象
     */
    private final MsgTypeService msgTypeService;

    @GetMapping("/list")
    @Operation(summary = "获取类型列表" , description = "获取类型列表")
    public ServerResponseEntity<List<MsgType>> list() {
        return ServerResponseEntity.success(msgTypeService.list(new LambdaQueryWrapper<MsgType>()));
    }
}